package com.songcha.library_common.helper

import android.content.Context
import android.media.MediaPlayer

class MediaPlayerHelper {
    companion object{

        @JvmStatic
        fun playMp3(context: Context, resId:Int){
            var mmp = MediaPlayer.create(context,resId)
            mmp!!.start()
            mmp!!.setOnCompletionListener {
                mmp!!.stop()
                mmp!!.release()
                mmp = null
            }
        }

        @JvmStatic
        fun destroy(){
            //mMp = null
        }

    }
}